﻿Imports Control.clases
Public Class EliminarDetalle
    Inherits System.Web.UI.Page

    Public _id As Integer

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not Session.Item("s_nombre") Is Nothing Then
                If Session("s_usuario").ToString() = "Usuario" Or Session("s_usuario").ToString() = "Administrador" Then
                    _id = Integer.Parse(Request.QueryString("id").ToString())
                End If
            Else
                Response.Redirect("Default.aspx")
            End If
        End If
    End Sub

    Protected Sub btnSi_Click(sender As Object, e As EventArgs) Handles btnSi.Click
        Dim detalle As New clsEquipo
        'Try
        detalle.eliminarDetalleEquipo(Integer.Parse(Request.QueryString("id").ToString()))
        Response.Redirect("Default.aspx")
        'Catch ex As Exception
        'Throw New System.Exception(ex.Message, ex.InnerException)
        'End Try
    End Sub

    Protected Sub btnNo_Click(sender As Object, e As EventArgs) Handles btnNo.Click
        Response.Redirect("Default.aspx")
    End Sub
End Class